package com.fatcat.easybuy.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 李开辰
 * @since 2025/9/13 14:04
 */
//树节点类
public class EasyBuyProductCategoryNode {
    private Long id;
    private String name;
    private Integer type;
    private List<EasyBuyProductCategoryNode> children = new ArrayList<>();

    public EasyBuyProductCategoryNode(EasyBuyProductCategory category) {
        this.id = category.getId();
        this.name = category.getName();
        this.type = category.getType();
    }

    public void addChild(EasyBuyProductCategoryNode child) {
        this.children.add(child);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<EasyBuyProductCategoryNode> getChildren() {
        return children;
    }

    public void setChildren(List<EasyBuyProductCategoryNode> children) {
        this.children = children;
    }
}
